<template>
	<view>
		<view class="" v-if="list.length">
			<slot></slot>
			<u-loadmore v-if='showLoad' :status="status" />
		</view>
		<view class="u-flex u-col-center u-row-center" v-else style="height: 50vh;">
			<u-empty :text="text" :mode="mode"></u-empty>
		</view>
	</view>
</template>

<script>
	export default {
		name: "w-list",
		props: {
			list: {
				type: Array,
				default: () => {
					return []
				}
			},
			text: {
				type: String,
				default: '暂无数据'
			},
			mode: {
				type: String,
				default: 'list'
			},
			status: {
				type: String,
				default: 'loadmore'
			},
			showLoad:{
				type:Boolean,
				default:true
			}
		},
		data() {
			return {

			};
		}
	}
</script>

<style>

</style>
